#include <cstdlib>
#include <ctime>

/* 随机返回一个数组元素 */
int randomAccess(int* nums, int size) {
    unsigned seed = time(0);
    srand(seed);
    int randomIndex = rand() % size;
    int randomNum = nums[randomIndex];
    return randomNum;
}
